<?php
	if(is_array($_POST['code_index'])) {
		$code_index = $_POST['code_index'];
		$sql = "UPDATE `tbl_code` SET `status` = '2' WHERE `code_index` IN (". implode (',',$code_index) .")";
	} else { 
		$code_index = $params[0]; 
		$sql = "UPDATE `tbl_code` SET `status` = '2' WHERE `code_index` = '$code_index' LIMIT 1"; 
	}
	mysql_query($sql);
	exit;
?>